#include "tipswindow.h"
#include "ui_tipswindow.h"
#include <QDebug>
#include <QApplication>
#include <QScreen>

TipsWindow::TipsWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::TipsWindow)
{
    ui->setupUi(this);
    ui->winIcon->setPixmap(QPixmap("qrc:/image/rightWin.png"));

    setWindowFlags(Qt::CustomizeWindowHint);
    QRect screen = QApplication::primaryScreen()->geometry();
    move((screen.width()-this->width())/2,(screen.height()-this->height())/2);


}

TipsWindow::~TipsWindow()
{
    delete ui;
}

void TipsWindow::setWindowType(MessageType msgtype)
{
    qDebug()<<"msgtype:"<<msgtype<<__LINE__;
    if(msgtype==1)
    {
        ui->riaghtBtn->hide();
    }
}

void TipsWindow::on_claseBtn_clicked()
{
    this->close();
}
